<template>
	<el-form ref="form" :model="form" label-width="80px" class="form" >
	  	<el-form-item label="帐号">
		    <el-input v-model="form.username"></el-input>
		</el-form-item>
		<el-form-item label="密码">
			<el-input v-model="form.password" type="password"></el-input>
		</el-form-item>
		<el-form-item label="确认密码">
			<el-input v-model="form.rePassword" type="password"></el-input>
		</el-form-item>
		<el-form-item label="帐号类型" class="radioGroup">
		    <el-radio-group v-model="form.type" >
		      <el-radio label="1">邮箱</el-radio>
		      <el-radio label="0">手机</el-radio>
		    </el-radio-group>
		</el-form-item>
		<!-- <el-form-item label="验证码">
		    <el-col :span="12">
		        <el-input v-model="form.verification"></el-input>
		    </el-col>
		    <el-col :span="12">
    			<el-button type="primary" size="large">点击获取验证码</el-button>
		    </el-col>
	    </el-form-item> -->
	  		<el-button type="primary" size="large" @click="nextRegister()">下一步</el-button>
	</el-form>
</template>
<script type="text/javascript">
export default {
	data() {
		return {
			form: {
		        username: '',
		        password: '',
		        rePassword: '',
		        type: '0',
		        verification: ''
        	}
		}
	},
	methods: {
		nextRegister: function() {
			if(this.form.password!=this.form.rePassword) {
				this.$message({
			        message: "两次密码不一致"
			    });
			    return;
			}
			this.$router.push({
				name: 'registerDel',
				params: {
					accountInfo: this.form
				}
			})
		}
	}
}
</script>
<style scoped>
	.form {
		width: 550px;
		margin: 100px auto 50px auto;
		z-index: 2;
		text-align: center;
		padding: 10px;
	}
	.form-self {
		margin-bottom: 30px;
		overflow: hidden;
	}
	.radioGroup {
		text-align: left;
	}
</style>